package com.suneast.suneaststore.modules.homepage.adapter;

import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.suneast.suneaststore.R;
import com.suneast.suneaststore.bean.homepage.BrandBean;

/**
 * Created by zestz on 2018/3/7.
 */

public class BrandAdapter extends BaseQuickAdapter<BrandBean, BrandAdapter.ViewHolder> {

    public BrandAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(ViewHolder helper, BrandBean item) {
        Glide.with(helper.itemView.getContext()).load(item.getLogo()).into(
                (ImageView) helper.getView(R.id.circle_img_product));
        helper.setText(R.id.tv_category_name,item.getBrandname());
    }

    public static class ViewHolder extends BaseViewHolder {

        public ViewHolder(View itemView) {
            super(itemView);
        }
    }
}
